extends Skill
class_name BingFengLingYu

#{
#"id": "bing_feng_ling_yu",
#"name": "冰封领域",
#"descriptions": "在指定区域召唤冰霜，减缓敌人移动速度并造成持续伤害。",
#"effect": "在指定区域内的敌人造成100点冰霜伤害并减少50%移动速度，每秒受到30的冰霜伤害，持续5秒",
#"is_active": 1,
#"triggle": 0,
#"params": [
	#100
#],
#"buffers": {
	#"deceleration": [
		#"5",
		#"0.5"
	#],
	#"frostbite": [
		#"5",
		#"30"
	#]
#}

func use(_targets:Array):
	var temp_buffers = []
	for item in buffers:
		var buffer = Utils.instatiate_class(GlobalVars.buffer_class_path,item).new(item,buffers[item]) 
		temp_buffers.append(buffer)
	for target in _targets:
		target.take_damage({"attack_power":0,"magic_power":params[0],"buffers":temp_buffers})
